#!/bin/sh
if [ -z "$1" ]; then
    SCRIPTPATH=$(dirname "$0")
    cd $(git rev-parse --show-toplevel)
    $SCRIPTPATH/custom-build-number-hook
    NUM=$(cat src/main/java/BuildNumber.properties | cut -f2 -d=)
    echo "No custom build number specified. Using \"$NUM\"."
else
    echo "build.number=$@" > src/main/java/BuildNumber.properties
fi
